import Vue from 'vue';

// list with filters page
//import login from '../views/task/login';
import task from '../views/task/task';
import todayTask from '../views/task/todayTask';
import weekTask from '../views/task/weekTask';
import monthTask from '../views/task/monthTask';
import yearTask from '../views/task/yearTask';
import projectTask from '../views/task/projectTask';
import oneTask from '../views/task/oneTask';

//需求和建议
import needAndAdvice from '../views/needAndAdvice/needAndAdvice';
import needAndAdviceContain from '../views/needAndAdvice/contain';
//总结
import note from '../views/note/note';
//市场
import market from '../views/market/market';
//档案库
import archive from '../views/archive/archive';
// 博客
import blog from '../views/blog/blog';

let routes = [
  //  {
  //    path: "/login",
  //    component: login,
  ////    redirect: "/login",
  //    name: '登录',
  //  }, //重定向  
  {
    path: '/task',
    component: task,
    name: '任务',
    redirect: "/todayTask",
    children: [{
        path: '/todayTask',
        component: todayTask,
        name: '今日任务'
      },
      {
        path: '/weekTask',
        component: weekTask,
        name: '周任务'
      },
      {
        path: '/monthTask',
        component: monthTask,
        name: '月任务'
      },
      {
        path: '/yearTask',
        component: yearTask,
        name: '年任务'
      },
      {
        path: '/projectTask',
        component: projectTask,
        name: '项目任务'
      },
      {
        path: '/projectTask/:pid',
        component: projectTask,
        name: '指定项目任务'
      },
      {
        path: '/projectTask/:pid/:part',
        name: '项目任务部门'
      },
      {
        path: '/oneTask',
        component: oneTask,
        name: '单任务'
      },
    ]
  },
  {
    path: '/',
    component: task
  }, {
    path: "/note",
    component: note,
    name: '总结',
  }, {
    path: "/market",
    component: market,
    name: '市场',
  },
  {
    path: '/needAndAdvice',
    component: needAndAdvice,
    name: '需求',
    redirect: "/advice",
    children: [{
      path: '/advice',
      component: needAndAdviceContain,
      name: '建议1',
      props: { switchType: 1 }
    }, {
      path: '/need',
      component: needAndAdviceContain,
      name: '需求2',
      props: { switchType: 2 }
    }]
  },
  {
    path: '/archive',
    component: archive,
    name: '档案库'
  },
  {
    path: '/blog',
    component: blog,
    name: '博客'
  }
];

export default routes;
